package zh.codegym.task.task05.task0532;

import java.io.*;

/* 
有关算法的任务
*/

public class Solution {
    public static void main(String[] args) throws Exception {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        int maximum = Integer.parseInt(reader.readLine());
        if(maximum<=0){
            return;
        }
        int max = Integer.MIN_VALUE,temp;
        //在此编写你的代码
        while (maximum-- > 0){
            if(max < (temp=Integer.parseInt(reader.readLine()))){
                max=temp;
            }
        }

        System.out.println(max);
    }
}
